<?php echo $this->doctype('XHTML1_STRICT');?>
<head>
    <meta http-equiv="content-type" content="text/html" charset = "utf-8" />
    <title>Customer | Admin Panel</title>
    <?php echo $this->headLink()->appendStylesheet('/css/back-end/reset.css'); ?> 
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/text.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/grid.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/layout.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/nav.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/style.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/themes/base/jquery.ui.all.css','all'); ?> 
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="/css/back-end/ie6.css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="/css/back-end/ie.css" media="screen" /><![endif]-->
    <link href="css/table/demo_page.css" rel="stylesheet" type="text/css" />
    <!-- BEGIN: load jquery -->
    <?php echo $this->headScript()->appendFile('/js/back-end/jquery-1.6.4.min.js');?>
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.widget.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.accordion.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.slide.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.mouse.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.sortable.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/table/jquery.dataTables.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/table/jquery.dataTables.min.js','text/javascript');?>   
    <!-- END: load jquery -->
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/table/table.js','text/javascript');?>   
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/setup.js','text/javascript');?>  
    <script type="text/javascript">

        $(document).ready(function () {
            setupLeftMenu();

            $('.datatable').dataTable();
			setSidebarHeight();


        });
    </script>   
</head>
<body>
    <div class="container_12">
        <div class="grid_12 header-repeat">
            <div id="branding">
                <div class="floatleft">
                    <img src="../../images/back-end/logo.png" alt="Logo" /></div>
                <div class="floatright">
                    <div class="floatleft">
                        <img src="../../images/back-end/img-profile.jpg" alt="Profile Pic" /></div>
                    <div class="floatleft marginleft10">
                        <ul class="inline-ul floatleft">
                            <li>Hello Admin</li>
                            <li><a href="#">Config</a></li>
                            <li><a href="#">Logout</a></li>
                        </ul>
                        <br />
                        <span class="small grey">Last Login: 3 hours ago</span>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="grid_12">
            <ul class="nav main">
                <li class="ic-dashboard"><a href="<?php echo $this->baseUrl();?>/admin/index"><span> Trang chủ </span></a> </li>
                <li class="ic-form-style"><a href="<?php echo $this->baseUrl();?>/admin/menu"><span> Món ăn </span></a> </li>				
                <li class="ic-charts"><a href="<?php echo $this->baseUrl();?>/admin/revenue"><span> Doanh thu </span></a></li>
                <li class="ic-grid-tables"><a href="<?php echo $this->baseUrl();?>/admin/customer"><span> Khách hàng </span></a></li>
                           

            </ul>
        </div>
        <div class="clear">
        </div>
        
        <div class="grid_10">
            <div class="box round first grid">
                <h2> Quản Lý Khách Hàng </h2>                
                <div class="block">                   
                    <table class="data display datatable" id="example">
					<thead>
						<tr>
							<th> UserID </th>
							<th> Username </th>
							<th> Password </th>
							<th> Update </th>
							<th> Delete </th>
						</tr>
					</thead>
					<tbody>
						<?php
							$result = $this->data;
							$totalLine =  count($result);						
							for ($i = 0; $i < $totalLine; $i++) 
							{ 						
    							echo "<tr class=\"gradeA\">";    							
    							echo "<td>" .$result[$i]['customer_id']. "</td>\n";
    							echo "<td>" .$result[$i]['customer_name']. "</td>\n";
    							echo "<td>" .$result[$i]['customer_password']. "</td>\n";    						
    							echo "<td><a href=\"".$this->baseUrl()."/admin/update?user_id=".$result[$i]['customer_id']."\"> <img src = \"/images/back-end/user_edit.png\" />  </a></td>";
    							
    							echo "<td><a href=\"".$this->baseUrl()."/admin/delete?user_id=".$result[$i]['customer_id']."\"> <img src = \"/images/back-end/trash.png\" /> </a></td>";
    							echo "</tr>";
							}
    					?>					
					</tbody>
				</table>				                  
                </div>                              
            </div>
        </div>
        <div id = "btInsert">
			<div id = "forward"> 
            	<input type = "button" name = "insert" value = "Insert" onclick="window.location ='/admin/insert'" /> 
            </div>
		</div>   
        <div class="clear">
        </div>
    </div>
    <div class="clear">
    </div>
    
</body>
</html>
